<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    var docEl = document.documentElement
    console.log(docEl.clientWidth);

    docEl.style.fontSize = 20 * (docEl.clientWidth / 375) + 'px'
  </script>
  <style>
    /* html{
      font-size: 20px;
    } */
    .app{
      width: 5rem;
      height: 5rem;
      background: #000;
    }
    .box{
      width: 10rem;
      height: 5rem;
      background: red;
    }
    /* @media screen and (min-width: 376px) {
      html {
        font-size: 25px;
      }
    } */
    /* @media screen and (min-width: 376px) {
      .app{
        width: 120px;
        height: 120px;
        background: #000;
      }
      .box{
        width: 220px;
        height: 120px;
        background: red;
      }
    }
    @media screen and (min-width: 415px) {
      .app{
        width: 140px;
        height: 140px;
        background: #000;
      }
      .box{
        width: 240px;
        height: 140px;
        background: red;
      }
    } */
  </style>
</head>
<body>
  <div class="app"></div>
  <div class="box"></div>
</body>
</html>